home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_gnats.idb / usr / freeware / lib / gnats / contrib / sql / README.z / README
Encoding:
Text File  |  1999-04-16  |  5.9 KB  |  207 lines

  1.  
  2. Overview
  3.  
  4. GNATS data can be extracted and uploaded into a relational
  5. database.  The advantages for doing this include
  6.  
  7.   1.  Interfacing the problem report information with other
  8.       information, e.g., a customer database
  9.  
  10.   2.  Take advantage of report writers to generate production
  11.       reports or more sophisticated report generation 
  12.       capabilities not present in GNATS
  13.  
  14.   3.  Perform complex queries available in SQL but not 
  15.       supported in GNATS
  16.  
  17. This directory includes a set of scripts that interfaces
  18. GNATS to an Informix relational database application.  
  19. There are four types of script in the current directory:
  20.  
  21.    Ignats.*     Unix shell scripts
  22.    *.sql       SQL (Structured Query Language) scripts,
  23.    *.ace       Informix report generator source code
  24.    *.4gl       Informix 4GL source code
  25.  
  26. A sample set of crontab entries has also been providedi in the
  27. file crontab.  An index to the files is provided in the file fileList.
  28.  
  29. This code is unsupported, and is provided only as an example of
  30. how you could use GNATS in conjunction with a relational
  31. database management system (rdbms).
  32.  
  33.  
  34. Application Structure
  35.  
  36. In this example, GNATS is main working database for the
  37. developers.  Extracted data are upload daily into the relational
  38. database for generation of management reports, overview
  39. statistics, and special queries.  Once the database has
  40. been created, most of the interactions are driven by
  41. shell scripts scheduled through the Unix cron utility.
  42.  
  43. Two Unix system users are assumed: "manager", who creates
  44. the database, and "staff", who receives some of the output
  45. reports via email.
  46.  
  47. See the GNATS and Informix manuals for more details on the
  48. specifics of the software.
  49.  
  50.  
  51. Database Creation
  52.  
  53. The main database consists of 5 tables, one for the problem reports 
  54. and one each for the severity, priority, class, and state codes.
  55. An additional table is used to hold a history of weekly summary 
  56. statistics.
  57.  
  58. The 3 script files used to create these tables, their indices,
  59. and access permissions, are as follows.
  60.  
  61.   crGNATS.sql
  62.   crCodes.sql
  63.   crHist.sql
  64.  
  65. Permissions are set to read/write permission for the creator,
  66. "manager", and read only for the rest of the world.  These scripts 
  67. are run manually once to create the database, and are not in the 
  68. cron table.
  69.  
  70. Two additional tables can be created to hold previous week's
  71. data in order to report on which problem reports have been
  72. updated in the last week.  These tables are created in 
  73.  
  74.   crOGNATS.sql
  75.  
  76. with the same access permissions.
  77.  
  78.  
  79. Scheduled Activities and Reports
  80.  
  81. Regular activities and reports by scheduled through cron.
  82. (See appendix A.)
  83.  
  84. Daily:
  85.  
  86. 1.  Extract data from GNATS by running query-pr.
  87.  
  88. 2.  Upload data in database
  89.  
  90. 3.  Calculate the age of each problem report at the time
  91.     of the upload.
  92.  
  93. 4.  Report on the problem reports that are of severity
  94.     "critical" that have not yet been fixed, i.e., in
  95.     either the "open" or "analyzed" states.
  96.  
  97. Weekly:
  98.  
  99. 1.  Manage the buffering of data from the last 2 weeks.
  100.  
  101. 2.  Generate summary statistics on the number of problem
  102.     reports in each of the known states, and store
  103.     into history table.
  104.  
  105. 3.  Generate the following management reports:
  106.  
  107.     - summary statistics on the problem reports in each
  108.       of the known states for the last two weeks
  109.  
  110.     - list of problem reports that have changed state 
  111.       in the past week
  112.  
  113.     - list of new problem reports for the past week
  114.  
  115.     - list of problem reports that are still not closed
  116.  
  117.     - list of change requests that are still not closed
  118.  
  119.     - statistics on "critical" and "serious" problem 
  120.       reports that have not been fixed, grouped by
  121.       customer
  122.  
  123.     - statistics on "critical" and "serious" problem 
  124.       reports that have not been fixed, grouped by
  125.       responsible person
  126.  
  127. 4.  Generate customer-specific lists of problem reports
  128.  
  129. Monthly:
  130.  
  131. 1.  Generate historical record of the problem report
  132.     statistics, in absolute counts and as a percentage of
  133.     total problem reports.
  134.  
  135.  
  136. Additional Scripts
  137.  
  138. A number of additional SQL scripts and report scripts
  139. not scheduled through cron are provided as examples.
  140. These can be customized to your specific needs.
  141.  
  142.  
  143. Customization and Use
  144.  
  145. The scripts mentioned above have been tested on a Sun 4
  146. workstation running Sun OS 4.1.x and Informix SE 5.x and
  147. Informix ISQL 4.1.  You will need an Informix Development 
  148. licence to compile and use the report generator sources.
  149.  
  150. Shell scripts should be reviewed for the correct pathnames
  151. where programs and reports are to be located.  Some of the
  152. scripts send email, or use parameterized reports that need
  153. local customization.
  154.  
  155. The SQL scripts should be easily portable to other relational
  156. database systems supporting SQL.  Informix report generator
  157. sources are not portable, but can serve as examples for
  158. report generators from other database vendors.
  159.  
  160.  
  161.  
  162.  
  163. APPENDIX A
  164.  
  165.  
  166. --------------------------------------------------------------------------
  167. Shell script      Informix Program*   Informix Script
  168. --------------------------------------------------------------------------
  169.  
  170. Daily:
  171.  
  172.   Ignats.setup       query-pr --sql 
  173.                     isql engdb          loadGNATS.sql
  174.                     fglgo               calc_age
  175.  
  176.   Ignats.summdy      isql engdb          cat_rev.sql
  177.  
  178.  
  179. Weekly:
  180.   
  181.   Ignats.summwk      fglgo               summ_wk.4gl
  182.                     isql engdb          cust_rev.sql 
  183.                     isql engdb          engr_rev.sql 
  184.  
  185.   Ignats.wkbuffs     isql engdb          loadOGNATS.sql
  186.  
  187.   Ignats.wkchng      sacego              wk_delta
  188.                     sacego              wk_open
  189.                     sacego              wk_st_chng
  190.                     sacego              open 
  191.                     sacego              enhreq
  192.   
  193.   Ignats.cust        sacego              bcust (custname)
  194.  
  195.  
  196. Monthly:
  197.  
  198.   Ignats.summmn      sacego              history
  199.                     sacego              historyPC
  200.  
  201. --------------------------------------------------------------------------
  202.  
  203.  
  204. * isql - SQL interpreter
  205.   sacego - report generator
  206.   fglgo - 4GL
  207.